<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Webmin-virtual servers manipulation</title>
</head>
<body>


<form method="post" action="manip_vs.php">
<table width="60%" align="center" cellspacing="0">
	<tr>
		<td align="center" colspan="2"><label><b>
		<h3>Webmin Virtual Server Manipulation</h3>
		</b></label></td>
	</tr>
	<tr>
		<td align="right" width="30%"><b>Login user:</b></td>
		<td align="left"><input type="text" width="20" id="user"
			name="user" /></td>
	</tr>
	<tr>
		<td align="right" width="30%"><b>Password:</b></td>
		<td align="left"><input type="password" width="20" id="pass"
			name="pass" /></td>
	</tr>
	<tr>
		<td align="right" width="30%"><b>Webmin base url:</b></td>
		<td align="left"><input type="text" width="40" id="base_url"
			name="base_url" style="width: 282px" /><label>&nbsp;
		&nbsp;Timeout:</label><input type="text" width="4" name="timeout" id="timeout"
			style="width: 32px" /></td>
	</tr>

	<!-- <tr>
		<td align="right" width="30%"><b>Type:</b></td>
		<td align="left"><select name="dom_type" id="dom_type" onchange="dom_type_changed(this);">
			<option value="alias">Alias</option>
			<option value="subserver">Subserver</option>
		</select></td>
		<script type="text/javascript">
			function dom_type_changed($select){
				}
		</script>
	</tr> -->
	<tr>
		<td align="right" width="30%"><b><label>Domain:</b></td>
		<td align="left"><input type="text" width="20" id="parent_domain"
			name="parent_domain">
	</tr>
	<tr>
		<td colspan="2" align="center">
		<h4><label><b>Add subdomains</b></label>
		<hr>
		</h4>
		</td>

	</tr>
	<tr>
		<td align="right" width="30%" valign="top"><b>Subdomains to
		add:</b></td>
		<td><textarea cols="40" rows="10" name="subdom_addlist"
			id="subdom_addlist"></textarea><br>
		<b>
		<h6>Note: if the input domains don't contain the '.' character,
		the domains will be concatenated with the parent domain address</h6>
		</b></td>

	</tr>
	<tr>
		<td align="right" width="30%" valign="top"><b>Description:</b></td>
		<td colspan="2"><input type="text" width="40" id="description"
			name="description" style="width: 338px" /></td>
	</tr>
	<tr>
		<td align="right" width="30%" valign="top"><b>Create random
		subdomain:</b></td>
		<td><input type="checkbox" checked name="random_flag"
			id="random_flag"
			onclick="e=document.getElementById('number_of_subdoms'); e.disabled=!e.disabled; e=document.getElementById('length_of_subdom'); e.disabled=!e.disabled; " />
		<label> Number of subdomains: </label><input type="text" width="4"
			name="number_of_subdoms" id="number_of_subdoms" style="width: 32px" />
		<label>&nbsp; &nbsp;Length of a subdomain:&nbsp;</label><input
			type="text" width="4" name="length_of_subdom" id="length_of_subdom"
			style="width: 40px" /></td>
	</tr>
	<tr>
		<td align="right" width="30%"><b>IP:</b></td>
		<td><label>Default</label><input type="checkbox"
			name="default_ip" id="default_ip" checked
			onclick="e=document.getElementById('shared_ip'); e.disabled=!e.disabled;" />&nbsp;&nbsp;<label>Shared:</label>&nbsp;&nbsp;<input
			type="text" width="40" id="shared_ip" name="shared_ip"
			disabled="disabled" /> <!-- <input type=hidden name="dir" value="1" /> <input
			type="hidden" name="mail" value="1" id="mail_1" /> <input
			type="hidden" name="dns" value="1" checked id="dns_1" /> <input
			type="hidden" name="prefix_def" value="prefix_def_0" /> <input
			type="hidden" name="web" value="1" checked id="web_1" /> <input
			type="hidden" name="webalizer" value="1" checked id="webalizer_1" />
		<input type="hidden" name="logrotate" value="1" checked
			id="logrotate_1" />--></td>
	</tr>
	<tr>
		<td colspan="2" align='center'>
		<h4><label><b>Add alias:</b></label></h4>
		<hr>
		</td>

	</tr>
	<tr>
		<td align="right" valign="top"><b>Alias to add:</b></td>
		<td><textarea cols="40" rows="10" name="alias_addlist"
			id="alias_addlist"></textarea><br>
		<b>
		<h6>Note: if the input domains don't contain the '.' character,
		the domains will be concatenated with the real domain address</h6>
		</b>
		<td></td>
	</tr>
	<tr>
		<td aligv="right"><b>Description:</b></td>
		<td><input type="text" width="40" id="alias_description" name="alias_description" style="width: 338px"></td>
		<td></td>
	</tr>
	<tr>
		<td align="right" width="30%" valign="top"><b>Create random
		subdomain:</b></td>
		<td><input type="checkbox" checked name="alias_random_flag"
			id="alias_random_flag"
			onclick="e=document.getElementById('number_of_alias_subdoms'); e.disabled=!e.disabled; e=document.getElementById('length_of_alias_subdom'); e.disabled=!e.disabled; " />
		<label> Number of subdomains: </label><input type="text" width="4"
			name="number_of_alias_subdoms" id="number_of_alias_subdoms" style="width: 32px" />
		<label>&nbsp; &nbsp;Length of a subdomain:&nbsp;</label><input
			type="text" width="4" name="length_of_alias_subdom" id="length_of_alias_subdom"
			style="width: 40px" /></td>
	</tr>
	<tr>
		<td colspan="2" align="center">
		<h4><label><b>Delete domains</b></label>
		<hr>
		</h4>
		</td>
	</tr>
	<tr>
		<td align="right" width="30%" valign="top"><b>Domains to
		delete:</b></td>
		<td><textarea cols="40" rows="10" name="subdom_dellist"
			id="subdom_dellist"></textarea><br>
		<b>
		<h6>Note: if the input domains don't contain the '.' character,
		the domains will be concatenated with the parent/real server address</h6>
		</b></td>
	</tr>

	<tr>
		<td align="center" colspan="2">
		<hr>
		<input type="submit" value="Start"
			onclick="var result = pre_post(); return result;" /> <script
			type="text/javascript">
			function pre_post(){
				var user = document.getElementById('user');
				var pass = document.getElementById('pass');
				var base_url = document.getElementById('base_url');
				var parent_server = document.getElementById('parent_domain');
				if((user.value=="") || (pass.value=="") || (base_url.value=="")   || (parent_server.value=="")){
					alert('You should fill in the Login user, password, Webmin base url and parent server');
					return false;
				}
			}
		</script></td>

	</tr>
</table>
</form>
</body>
</html>
